package com.itboye.ihomebank.activity.keytwo;

/**
 * b白马锁返回的错误码
 */
public class TostKey {

    public static String getStamp(String log) {
        String str="";
        try {
            if (log.indexOf("10000") != -1) {//包含
                str="网络连接错误 ";
            }else if (log.indexOf("10001") != -1) {
                str="无效的参数 ";
            }else if (log.indexOf("10002") != -1) {
                str="返回数据格式异常";
            }else if (log.indexOf("10003") != -1) {
                str="返回数据有错误码";
            }else if (log.indexOf("10004") != -1) {
                str="应用没有初始化";
            }else if (log.indexOf("10005") != -1) {
                str="用户没有登录";
            }else if (log.indexOf("10006") != -1) {
                str="应用ID为空";
            }else if (log.indexOf("10007") != -1) {
                str="应用秘钥为空";
            }else if (log.indexOf("20000") != -1) {
                str="该用户已经注册 ";
            }else if (log.indexOf("20001") != -1) {
                str="无效的用户Token";
            }else if (log.indexOf("30000") != -1) {
                str="Mac地址为空";
            }else if (log.indexOf("30001") != -1) {
                str="Mac地址格式错误 ";
            }else if (log.indexOf("30002") != -1) {
                str="锁已被绑定";
            }else if (log.indexOf("30003") != -1) {
                str="锁不存在";
            }else if (log.indexOf("30004") != -1) {
                str="锁已被解绑";
            }else if (log.indexOf("30005") != -1) {
                str="锁名称为空 ";
            }else if (log.indexOf("30006") != -1) {
                str="用户ID为空";
            }else if (log.indexOf("30007") != -1) {
                str="用户ID错误";
            }else if (log.indexOf("30008") != -1) {
                str="租客密码条目错误";
            }else if (log.indexOf("30009") != -1) {
                str="租客密码为空";
            }else if (log.indexOf("30010") != -1) {
                str="锁密码长度错误(6~10)";
            }else if (log.indexOf("30011") != -1) {
                str="锁密码位置错误(1~55)";
            }else if (log.indexOf("30012") != -1) {
                str="锁密码不存在 ";
            }else if (log.indexOf("30012") != -1) {
                str="锁密码不存在 ";
            }else if (log.indexOf("30013") != -1) {
                str="需要同步锁时间 ";
            }else if (log.indexOf("40000") != -1) {
                str="设备Android系统不支持";
            }else if (log.indexOf("40001") != -1) {
                str="设备不支持蓝牙功能";
            }else if (log.indexOf("40002") != -1) {
                str="蓝牙未开启 ";
            }else if (log.indexOf("40003") != -1) {
                str="蓝牙设备为空 ";
            }else if (log.indexOf("40004") != -1) {
                str="蓝牙连接超时 ";
            }else if (log.indexOf("40005") != -1) {
                str="蓝牙断开 ";
            }else if (log.indexOf("40006") != -1) {
                str="蓝牙连接失败 ";
            }else if (log.indexOf("40007") != -1) {
                str="获取蓝牙特征为空  ";
            }else if (log.indexOf("40008") != -1) {
                str="发现蓝牙服务失败 ";
            }else if (log.indexOf("40009") != -1) {
                str=" 蓝牙写特征失效 ";
            }else if (log.indexOf("40010") != -1) {
                str=" 蓝牙返回数据失败  ";
            }else if (log.indexOf("40011") != -1) {
                str="蓝牙返回数据异常  ";
            }else if (log.indexOf("40012") != -1) {
                str=" 锁电量过低";
            }else {
                str=" 其他错误";
            }
        }catch (Exception e){

        }
        return str;
    }
}
